<template>
  <div class="content">
      <header>
        <ul><li @click="$router.push('/user_info')" class="grey"><img class="back-icon" src="~assets/img/icon_l@2x.png" alt=""> 返回</li><li style="box-sizing:border-box"><h2 style="font-size:16px">{{$parent.title}}</h2></li><li></li></ul>
      </header>
      <div id="mobile" class="common-li"><span>手机号</span><time class="common-rigth">{{tel | totel}}</time></div>
      <div class="tc"><router-link to="/update_mobile" style="opacity:1" class="common-btn" tag="button">更换手机号</router-link></div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      tel: ''
    }
  },
  mounted () {
    this.$apiPost('userinfo',{}).then((data) => {
      this.tel = data.data.account_info.phone
    })
  },
  filters: {
    totel (str) {
      return `${str.slice(0, 3)}******${str.slice(-3)}`
    }
  }
}
</script>
<style scoped lang='scss'>
    #mobile{
     margin-top: 10px;
     time{
       margin-right:5px;
     }
  }
</style>
